<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">  
    <meta name="format-detection" content="telephone=no">  
	<meta http-equiv="x-rim-auto-match" content="none"> 
    <title>怡臣优选3.0-收货地址</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/member.css">
    <include file="Public/common_js"/>
</head>
<body>
    <if condition="empty($addList)">
        <div class="warp">
            <!-- 购物车为空的时候显示 -->
            <div class="empty-box">
                <img src="__PUBLIC__/Home/images/addressEmpty.png" alt="">
                <p>亲，您还没有添加地址</p>
                <p><a href="{:url('address/addressModify')}" class="btn btn-hollow">+添加地址</a></p>
            </div>
        </div>
    <else />
        <div class="warp">
            <div class="member-address">
                <ul>
                    <volist name="addList" id="addr">
                        <li>
                            <p class="clearfix"><span class="fl">{$addr[name]}</span><span class="fr">{$addr[mobile]}</span></p>
                            <p class="clearfix text-hide"><if condition="$addr[def_addr] eq 1 "><label>默认地址</label></if><span>{$addr[addr]}</span></p>
                            <p class="clearfix">
                                <a href="javascript:void(0);" data-id="{$addr[addr_id]}" class="isSelect fl choice  <if condition='$addr[def_addr] eq 1 '>active</if>">设为默认地址</a>
                            <span class="fr">
                                <a href="{:url('Address/addAddress',['addrId'=>$addr[addr_id],'url'=>'Member/memberAddress'])}" class="edit">编辑</a>
                                <a href="{:url('Member/deleteAddr',['addrId'=>$addr[addr_id]])}" class="delete">删除</a>
                            </span>
                            </p>
                        </li>
                    </volist>

                </ul>
            </div>
            <a href="{:url('address/addressModify',['url'=>'Member/memberAddress'])}" class="new-address">+新建地址</a>
        </div>
    </if>
    <script>
		require(['member/infoAddress']);
	</script>
</body>
</html>
